<%@page import="com.xxb.entity.User"%>
<%@page import="com.xxb.dao.UserDao"%>
<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%
	request.setCharacterEncoding("UTF-8");
	
	String useremail = request.getParameter("useremail");
	String userpwd = request.getParameter("userpwd");
	
	User user =  new UserDao().login(useremail,userpwd);
	if(user == null){
		response.sendRedirect("login.jsp?code=110");
	}else{
		session.setAttribute("curruser",user);
		response.sendRedirect("main.jsp");
	}
%>